package com.six.controller;

import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class Test {
	
	@RequestMapping("/hello")
	public ModelAndView hello(HttpSession session){
		ModelAndView modelAndView = new ModelAndView("redirect:index.jsp");
		String name= "Hello World!!";
		modelAndView.addObject("hello", name);
		session.setAttribute("hello2", "Hello 2");
		return modelAndView;
	}

}
